import { defineConfig } from "vite";
import {createVuePlugin} from 'vite-plugin-vue2';
import path from 'path';
import requireTransform from 'vite-plugin-require-transform';   //核心代码

// https://vitejs.dev/config/
export default defineConfig({
  plugins:[
    createVuePlugin(),
    requireTransform({fileRegex: /.js$|.vue$/})     //核心代码
  ],
  resolve: {
    alias: {
      '@': path.resolve(__dirname, './src'),
      // 更多别名...
    },
  },
})
